package com.ming.javaweb.beans.DTO;

import com.ming.javaweb.util.Constants;

public class StudentDTO {
    /**
     *输入的查询信息
     */
    private String studentName;

    /**
     * 当前页码数
     */
    private int pageNow;
    /**
     * 每页展示10条数据
     */
    private int pageSize= Constants.PAGE_SIZE;

    /**
     * 获取limit start，len中的start
     * @return
     */
    public int getStart() {
        return (pageNow - 1) * pageSize;
    }

    public int getPageNow() {
        return pageNow;
    }

    public void setPageNow(int pageNow) {
        this.pageNow = pageNow;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public String getStudentName() {
        return studentName;
    }

    public void setStudentName(String studentName) {
        this.studentName = studentName;
    }

    @Override
    public String toString() {
        return "StudentDTO{" +
                "studentName='" + studentName + '\'' +
                ", pageNow=" + pageNow +
                ", pageSize=" + pageSize +
                '}';
    }
}
